/**
 * 
 */
package net.sf.cldsql.dj.mvc;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.security.Principal;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

import net.sf.cldsql.dj.container.base.DiBaseContext;

/**
 * DiContext
 */
public interface DiContext extends DiBaseContext{

    @SuppressWarnings("unchecked")
    public abstract Map<String, String[]> getParameterMap();

    public abstract String getParam(String name);

    public abstract String getPathInfo();

    public abstract String getMethod();

    /** @param string */
    public abstract void setMethod(String method);

    @Override
    public abstract DiSession getSession(boolean isNew);

    public abstract void addCookie(String name, String value, String domain,
            String path, int maxAge);

    public abstract HashMap<String, Object> getCookieValue(String name);

    public abstract OutputStream getResponseOutputStream() throws IOException;

    public abstract PrintWriter getResponseWriter() throws IOException;

    public abstract void addResponseHeader(String name, String value);

    public abstract void setResponseHeader(String name, String value);

    public abstract void setResponseDateHeader(String name, long offset);

    public abstract void setResponseCharacterEncoding(String encoding);

    public abstract void setResponseContentType(String contentType);

    public abstract String getHeader(String paramString);

    public abstract Enumeration getHeaderNames();

    public abstract Enumeration getHeaders(String paramString);

    public abstract InputStream getInputStream() throws IOException;

    public abstract BufferedReader getReader() throws IOException;

    public abstract String getCharacterEncoding();

    public abstract void setCharacterEncoding(String charsetName);

    public abstract String getContextPath();

    public abstract String getServletPath();

    public abstract String getAuthType();

    public abstract Principal getUserPrincipal();

    public abstract String getContentType();

    public abstract int getContentLength();

    public abstract String getProtocol();

    public abstract String getLocalAddr();

    public abstract int getLocalPort();

    public abstract String getLocalName();

    public abstract String getPathTranslated();

    public abstract String getQueryString();

    public abstract String getRemoteAddr();

    public abstract String getRemoteHost();

    public abstract int getRemotePort();

    public abstract String getRemoteUser();

    public abstract String getRequestedSessionId();

}
